*{
    margin:0;
    padding:0;
    box-sizing: border-box;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    background:#08001b;
    min-height: 100vh;
}
.container{
    width: 1100px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.container .card{
    position: relative;
    width: 300px;
    height: 400px;
    background:#0c002b;
    display: flex;
    justify-content: center;
    /* flex中交叉轴居中 */
    align-items: center;
    margin: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
    overflow: hidden;
}
.container .card{
    opacity: .5;
}
.container.card:hover {
    opacity:1;
}
.container .card::before{
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    bottom: 2px;
    width: 50%;
    background:rgba(255, 255, 255, .1);
    /* css3中有意思的属性：看得见摸不着 */
    pointer-events:none;
}
.container .card .content{
    padding:30px;
    text-align: center;
}
.container .card .content h2{
    position: absolute;
    right:30px;
    font-size:64px;
    font-weight: 800;
    color:#1779ff;
    z-index: 1;
    opacity: .1;
    transition:0.5s;
}
.container .card:hover .content h2{
    opacity: 1;
    transform:translateY(-70px);
}
.container .card .content h3{
    position: relative;
    font-size: 24px;
    color:#fff;
    z-index: 2;
    opacity: .5;
    /* 字母之间的间距 */
    letter-spacing: 1px;
    transition:0.5s;
}
.container .card .content p{
    position: relative;
    font-size: 16px;
    color: #fff;
    z-index: 2;
    opacity: .5;
    font-weight: 300;
    transition:0.5s;
}
.container .card:hover .content h3,
.container .card:hover .content p{
    opacity: 1;
}
.container .card .content a{
    display: inline-block;
    margin-top: 15px;
    padding:8px 15px;
    background-color: #fff;
    color:#0c002b;
    text-decoration: none;
    /* 字母全部转换为大写 */
    text-transform: uppercase;
    font-weight: 600;
}
.container .card span{
    transition: 0.5s;
    opacity: 0;
}
.container .card:hover span{
    opacity: 1;
}
.container .card span:nth-child(1){
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    /* 线性渐变，默认tobottom */
    background:linear-gradient(to right,transparent,#1779ff);
    animation: animate1 2s linear infinite;
}
@keyframes animate1{
    0%{
        transform: translateX(-100%);
    }
    100%{
        transform: translateX(100%);
    }
}

.container .card span:nth-child(2){
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background:linear-gradient(to bottom,transparent,#1779ff);
    animation: animate2 2s linear infinite;
    /* 动画延时 */
    animation-delay: 1s;
}
@keyframes animate2{
    0%{
        transform: translateY(-100%);
    }
    100%{
        transform: translateY(100%);
    }
}

.container .card span:nth-child(3){
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background:linear-gradient(to left,transparent,#1779ff);
    animation: animate3 2s linear infinite;
}
@keyframes animate3{
    0%{
        transform: translateX(100%);
    }
    100%{
        transform: translateX(-100%);
    }
}

.container .card span:nth-child(4){
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background:linear-gradient(to top,transparent,#1779ff);
    animation: animate4 2s linear infinite;
    animation-delay: 1s;
}
@keyframes animate4{
    0%{
        transform: translateY(100%);
    }
    100%{
        transform: translateY(-100%);
    }
}
